import QtQuick 2.15
import QtQuick.Window 2.15
//import QtQuick.VirtualKeyboard 2.15

import QtQuick.Controls 2.12 as Controls

Window {
    id: window
    width: 640
    height: 480
    visible: true
    title: qsTr("Hello World")

    Column {
            anchors.centerIn: parent
            spacing: 10

            Text {
                text: "Text Box 1:"
                font.bold: true
                font.pixelSize: 14
            }

            Controls.Label {
                objectName: 'cpp label'
                text: 'qml && cpp'

                function getText() {
                    return text
                }
            }

            Rectangle {
                        width: parent.width
                        height: 30
                        color: "white"
                        border.color: "black"
                        border.width: 1

            TextEdit {
                id: textBox1
//                placeholderText: "Enter text..."
                text:"textBox1"
                width: parent.width
                height: 30

                signal q_textChanged(string newText)

                //onTextChanged: q_textChanged(text)
                onTextChanged: q_textChanged(text)


            }
            }

            Text {
                text: "Text Box 2:"
                font.bold: true
                font.pixelSize: 14
            }

            TextEdit {
                id: textBox2
//                placeholderText: "Enter text..."
                width: parent.width
                height: 30
            }

            TextEdit {
                id: textBox3
//                placeholderText: "Enter text..."
                //text.
                width: parent.width
                height: 30

                onTextChanged:
                    NumberAnimation {
                    target: object
                    property: "name"
                    duration: 200
                    easing.type: Easing.InOutQuad
                }
            }
        }

//    InputPanel {
//        id: inputPanel
//        z: 99
//        x: 0
//        y: window.height
//        width: window.width

//        states: State {
//            name: "visible"
//            when: inputPanel.active
//            PropertyChanges {
//                target: inputPanel
//                y: window.height - inputPanel.height
//            }
//        }
//        transitions: Transition {
//            from: ""
//            to: "visible"
//            reversible: true
//            ParallelAnimation {
//                NumberAnimation {
//                    properties: "y"
//                    duration: 250
//                    easing.type: Easing.InOutQuad
//                }
//            }
//        }
//    }
}
